{{--@if(\Encore\Admin\Facades\Admin::user()->can('check.total'))--}}
<div class="btn-group pull-right" style="margin-right: 10px">
    <button class='btn btn-sm btn-warning my-modal' data-action="toStar"><i class="fa fa-plus"></i> 更新星级</button>
</div>
<div class="btn-group pull-right" style="margin-right: 10px">
    <button class='btn btn-sm btn-info my-modal' data-action="toCheck"><i class="fa fa-plus"></i> 核算报表</button>
</div>
{{--@endif--}}
<div class="modal fade" id="myModal" tabindex="-1" data-backdrop="static" data-keyboard="false">
    <div class="modal-dialog">
        <div class="modal-content">
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div class="btn-group pull-right" style="margin-right: 10px">
    <a class="btn btn-sm btn-twitter" href="{{ $downloadUrl }}" target="_blank"><i class="fa fa-download"></i> 导出</a>
</div>
<script language="JavaScript" type="text/javascript">
    $(function () {
        $('.my-modal').on('click', function(e) {
            e.preventDefault();
            var action = $(this).data('action');
            $("#myModal").modal({
                remote : '/xqc/operation/total-modal?&action=' + action
            });
        });
        $("#myModal").on("hidden.bs.modal", function() {
            $(this).removeData("bs.modal");
            $(this).find(".modal-content").children().remove();
        });
    });
</script>
